class Person {
  // 实例属性
  name: string
  age: number

  // 只读属性
  readonly gender: string = 'male'

  // 类级别只读属性
  static readonly face: string = 'handsome'

  // 构造器
  constructor(name: string, age: number) {
    this.name = name
    this.age = age
  }

  static isHandsome(): boolean {
    return Person.face === 'handsome'
  }

  // 普通方法
  introduce(): string {
    return `hello, I'm ${this.name}, ${this.age} years old`
  }

}

class Student extends Person {
  grade: number
  constructor(name: string, age: number, grade: number) {
    super(name, age)
    this.grade = grade
  }

  introduce(): string {
    return super.introduce() + `, study in grade ${this.grade}`
  }
}

export {Person, Student}